<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>Red Sea Bio-geographic Information System</title>
        <?php include_http_metas() ?>
        <?php include_metas() ?>
        <link REL="SHORTCUT ICON" HREF="/images/adresslogo.png"/>
        <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />

        <?php use_stylesheet("main.css") ?>

        <link rel="shortcut icon" href="/favicon.ico" />

        <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
        <script type="text/javascript" src="/js/jquery/jquery.js"></script>

        <!-- incompatibility auto-complete issue: put autocomplete plugin after jquery-ui -->
        <script type="text/javascript" src="/js/jquery/custom-jquery-rbis/jquery-ui-1.8.12.custom.min.js"></script>
<!--        <script type="text/javascript" src="/js/jquery/jquery.autocomplete.js"></script>-->

        <script type="text/javascript" src="/js/jquery/grid/src/i18n/grid.locale-en.js"></script>
        <script type="text/javascript" src="/js/jquery/grid/src/grid.base.js"></script>
        <script type="text/javascript" src="/js/jquery/grid/src/grid.common.js"></script>
        <link rel="stylesheet" href="/css/jquery/grid/ui.jqgrid.css"></link>

        <script type="text/javascript" src="/js/general/general.js"></script>
<!--        <link rel="stylesheet" href="/css/jquery/theme/ui-lightness/jquery.ui.all.css"/>-->

        <!-- incompatibility auto-complete issue: put autocomplete plugin after jquery-ui -->
        <link rel="stylesheet" href="/css/jquery/theme/custom-jquery-rbis/jquery-ui-1.8.12.custom.css"/>
        <link rel="stylesheet" href="/css/jquery/jquery.autocomplete.css"/>

        <script type="text/javascript" src="/js/jquery/jquery.defaultText.js"></script>
        
<!--        <script type="text/javascript" src="/js/jquery/ui/jquery.ui.core.js"></script>
        <script type="text/javascript" src="/js/jquery/ui/jquery.ui.widget.js"></script>
        <script type="text/javascript" src="/js/jquery/ui/jquery.ui.button.js"></script>
        <script src="/js/jquery/ui/jquery.ui.accordion.js"></script>
        <script src="/js/jquery/ui/jquery.ui.mouse.js"></script>
        <script src="/js/jquery/ui/jquery.ui.slider.js"></script>
        <script src="/js/jquery/ui/jquery.ui.tabs.js"></script>-->
        
<!--        <script type="text/javascript" src="/js/Flot/jquery.flot.js"></script>
        <script language="javascript" type="text/javascript" src="/js/Flot/excanvas.js"></script>
        <script language="javascript" type="text/javascript" src="/js/Flot/jquery.flot.pie.js"></script>-->
        <script type="text/javascript" src="https://www.google.com/jsapi"></script>

        <?php include_javascripts() ?>
        <?php include_stylesheets() ?>
        
        <script type="text/javascript">
        </script>
    </head>
    <body>
        <div id="container">
            <div id="top">
            <table id="header" class="wrappingCenter" cellpadding="0" cellspacing="0">
                <tr>
                    <?php if( !$sf_user->isAuthenticated()): ?>
                    <td class="logocell">
                        <img src="/images/rbis_text.png" width="77px"/>
                    </td>
    <!--                <td width="55%" style="padding-left: 10px; padding-right: 20px; ">
                        <?php //include_component('login', 'Showloginbox'); ?>
                    </td>-->
                        <td width="55%" style="padding-left: 10px; padding-right: 20px; ">
                            <ul id="menu">
                                <li><a id="btnPublication" style="cursor: pointer" title="Publication">Home</a></li>
                                <li><a id="btnRegistration" href="<?php echo url_for('login/newAccount'); ?>" style="cursor: pointer" title="Publication">Registration</a></li>
    <!--                            <li><a href="#" title="about">about</a></li>-->
                                <li><a id="btnVisualization" href="#" style="cursor: pointer" title="Visualization">Visualization</a></li>
                                <li><a id="btnsurvey" href="https://spreadsheets.google.com/spreadsheet/viewform?formkey=dEFNM2FxN1EyTG9NRFdXTXBFeHZRanc6MQ" style="cursor: pointer" title="Feed Back Survey">Feedback</a></li>
                            </ul>
                        </td>
                        <td align="right">
                            <div>
                                <table cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <ul id="menu">
    <!--                                            <li><a href="#" title="Visualization">help</a></li>-->
                                            </ul>
                                        </td>
                                         <td>
                                            <a href="<?php echo url_for('general/help') ?>">
                                                <span class="headerspan">Help</span>
                                            </a>
                                        </td>
                                        <td style="border-right: solid 1px #b4c8d5; padding-left: 3px;padding-right: 10px"></td>

        <!--                                    <form action="<?php //echo url_for('login/newAccount') ?>" name="Register" method="GET">
                                                <div id="compGroupB" class="clearfix">
                                                    <button id="btnSignUp" style="height: 20px; font-size: 10px" onclick="document.Register.submit();return false;">Sign Up</button>
                                                </div>
                                            </form>-->
                                        <td style="padding-left: 0px; padding-right: 5px">
        <!--                                  <a onclick="showAsDialog(250,150,28,1170,false,'loginwindow')" style="cursor: pointer"><span class="headerspan">Sign In / Register</span></a>-->
                                              <?php include_component('login', 'Showloginbox'); ?>
                                      </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                        <?php else: ?>
                        <td class="logocell" align="center">
                            <img src="/images/rbis_text.png" width="77px"/>
                        </td>
                        <td width="55%" style="padding-left: 10px; padding-right: 20px; ">
                            <ul id="menu">
                                <li><?php echo link_to1('Home', 'home/index', array('id' => 'btnHome', 'style' => 'height: 20px;')); ?></li>
                                <li><?php echo link_to1('Messages', 'home/messages', array('id' => 'btnMessage', 'style' => 'height: 20px;')); ?></li>
                                <li><?php echo link_to1('Visualization', 'main/index', array('id' => 'btnVisualization', 'style' => 'height: 20px; ')); ?></li>
                                <li><?php echo link_to1('Feedback', 'https://spreadsheets.google.com/spreadsheet/viewform?formkey=dEFNM2FxN1EyTG9NRFdXTXBFeHZRanc6MQ', array('id' => 'btnsurvey', 'title' => 'Feed Back Survey', 'style' => 'height: 20px; ')); ?></li>
                            </ul>
                        </td>
                        <td align="right">
                            <div>
                                <table cellpadding="0" cellspacing="0">
                                    <tr>
    <!--                                    <td>
                                            <span class="headerspan">Profile</span>
                                        </td>-->
                                        <td>
                                            <a href="<?php echo url_for('general/help') ?>">
                                                <span class="headerspan">Help</span>
                                            </a>
                                        </td>
                                        <td style="border-right: solid 1px #c3c3b6; padding-left: 3px;padding-right: 3px"></td>
                                        <td>
                                            <a href="<?php echo url_for('home/profile') ?>">
                                                <span class="headerspan">Settings</span>
                                            </a>
                                        </td>
                                        <td style="border-right: solid 1px #c3c3b6; padding-left: 3px;padding-right: 3px"></td>
                                        <td style="padding-left: 5px; padding-right: 20px;">
        <!--                                    <form action="<?php //echo url_for('login/logout') ?>" name="Logout" method="GET">-->
                                            <div id="compGroupB" class="clearfix">
                                                <a onclick="logOut()" style="cursor: pointer"><span class="headerspan">Sign Out</span></a>
                                            </div>
        <!--                                    </form>-->
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                        <?php endif; ?>
                    </tr>
                </table>
            </div>

            <div id="content"class="wrappingCenter" >
                <?php echo $sf_content ?>
            </div>

            <div id="footer" align="left">
                <table width="100%" align="left">
                    <tr>
                        <td>
                            <ul style="padding-left:0">
                                <li><a href="/general/about">About Us</a></li>
                                <li><a href="/general/help">Quick Start</a></li>
                                <li><a href="/general/termsofuse">Terms of Use</a></li>
                                <li><a href="http://rsrc.kaust.edu.sa/pages/home.aspx">Red Sea Research Center</a></li>
                                <li><a href="http://www.kaust.edu.sa/">KAUST</a></li>
                            </ul>
                        </td>
                        <td>
                            <div id="copyrights" align="right">
                                <span>KAUST © 2011</span><br/>
                                <span>all user contributed content is licensed under <a href="http://creativecommons.org/licenses/by-sa/3.0/">cc-wiki</a></span>
                            </div>
                        </td>
                    </tr>
                </table>
                
            </div>
             
        </div>
    </body>
</html>
